<% notes = notes || @notes # accept local if present, default to instance %>
<% pinned_nodes = pinned_nodes || @pinned_nodes || [] # accept local if present, default to instance %>
<% tagname = tagname || false %>
<div id="notes">
  <div class="row">
    <% (pinned_nodes + notes).each_with_index do |node,i| %>
      <div class="<% if @widget %>col-4 <% end %><%= node.tagnames_as_classes %> col-lg-4 col-md-6 clearfix node note node-nid-<%= node.id %> note-nid-<%= node.id %><% if node.status == 4 %> moderated<% end %>">

        <%= render partial: 'notes/card', locals: { node: node, i: i, tagname: tagname } %>

      </div>

      <% unless @widget %><hr class="d-md-none" /><% end %>
    <% end %>
  </div>
</div>
<% if @pagy %>
  <%== pagy_bootstrap_nav @pagy %>
<% else %>
  <%= will_paginate notes, renderer: WillPaginate::ActionView::BootstrapLinkRenderer unless @unpaginated || (unpaginated ||= false) %>
<% end %>
